package com.example.demo0630.bean;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @author lzh
 * @date 2020/6/30 - 11:26
 */

/*
  @PropertySource ：加载指定的properties配置文件
 * SpringBoot读取 properties 配置文件
 * */
@PropertySource(value = "classpath:demo.properties")
@Component //注册bean
@Data
public class TestProCfg {


    @Value("${name}")
    private String name;



}
